<?php

class NewsBox extends AbstractBox {
	protected $template = 'article/news_box.tpl';
	
	protected function setup() {
		$articleRepository = new ArticleRepository();
		$articleRepository->setOrderBy(array('crdate' => 'desc'));
		$articleRepository->setLimit(2);
		$articles = $articleRepository->getByArticleType(array(Article::TYPE_ARTICLE, Article::TYPE_STORY));
		
		MySmarty::assign('articles', $articles);
	}
}

?>